package oop.core.view.listeners;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.io.File;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Set;
import java.util.Map.Entry;

import javax.swing.JFileChooser;
import javax.swing.JOptionPane;

import oop.core.control.ControlConfigSaver;
import oop.core.control.Controller;
import oop.core.view.ControllerConfigMenu;

/**
 * Saves the configuration that is currently displayed in the 
 * ControllerConfigurationMenu.
 * @author Alex
 *
 */
public class SaveControllerConfigListener implements ActionListener {
	
	private ControllerConfigMenu menu;

	public SaveControllerConfigListener(ControllerConfigMenu menu)
	{
		this.menu = menu;
	}
	
	@Override
	public void actionPerformed(ActionEvent e) {
		ControlConfigSaver saver = new ControlConfigSaver();
		saver.saveConfig(menu);
	}

}
